package com.weighttracker.android;

import com.bappi.custom.activities.CustomActivity;
import com.bappi.utils.Constants;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class Tab4Activity1 extends CustomActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		try {
			super.onCreate(savedInstanceState);
			setContentView(R.layout.layout_tab_4_screen_1);
			findViewById(R.id.button_calories_history_chart)
					.setOnClickListener(new View.OnClickListener() {

						@Override
						public void onClick(View v) {
							Intent intent = new Intent(getParent(),
									Tab4Activity2.class);
							intent.putExtra(Constants.KEY_CHART_TYPE, 0);
							pushIntnet(intent);
						}
					});
			findViewById(R.id.button_unit_history_chart).setOnClickListener(
					new View.OnClickListener() {

						@Override
						public void onClick(View v) {
							Intent intent = new Intent(getParent(),
									Tab4Activity2.class);
							intent.putExtra(Constants.KEY_CHART_TYPE, 1);
							pushIntnet(intent);
						}
					});
			findViewById(R.id.button_workout_history_chart).setOnClickListener(
					new View.OnClickListener() {

						@Override
						public void onClick(View v) {
							Intent intent = new Intent(getParent(),
									Tab4Activity2.class);
							intent.putExtra(Constants.KEY_CHART_TYPE, 2);
							pushIntnet(intent);
						}
					});
			findViewById(R.id.button_weight_history_chart).setOnClickListener(
					new View.OnClickListener() {

						@Override
						public void onClick(View v) {
							Intent intent = new Intent(getParent(),
									Tab4Activity2.class);
							intent.putExtra(Constants.KEY_CHART_TYPE, 3);
							pushIntnet(intent);
						}
					});

		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
